using System;
using System.Collections.Generic;
using Colorful.Furniture.EnterpriseManagement;
using FreeSql.DataAnnotations;

namespace Colorful.Furniture.PermissionManagement
{

    /// <summary>
    /// 角色
    /// </summary>
    [Table(Name = "sys_role")]
    public partial class SysRole
    {

        /// <summary>
        /// 编码
        /// </summary>
        [Column(Name = "id", IsPrimary = true)]
        public Guid Id { get; set; }

        /// <summary>
        /// 角色代码
        /// </summary>
        [Column(Name = "code", StringLength = 50)]
        public string Code { get; set; }

        /// <summary>
        /// 是否禁用
        /// </summary>
        [Column(Name = "is_disabled")]
        public bool IsDisabled { get; set; }

        /// <summary>
        /// 是否系统默认
        /// </summary>
        [Column(Name = "is_system")]
        public bool IsSystem { get; set; }

        /// <summary>
        /// 角色名字
        /// </summary>
        [Column(Name = "name", StringLength = 50)]
        public string Name { get; set; }

        /// <summary>
        /// 所属组织编码
        /// </summary>
        [Column(Name = "department_id")]
        public Guid? DepartmentId { get; set; }

        /// <summary>
        /// 角色描述
        /// </summary>
        [Column(Name = "remark", StringLength = 200)]
        public string Remark { get; set; }

        #region 外键 => 导航属性，OneToMany

        public virtual Department Department { get; set; }

        public virtual List<SysManagerRole> ManagerRoles { get; set; }


        public virtual List<SysRoleAccess> RoleAccesses { get; set; }

        #endregion

        #region 外键 => 导航属性，ManyToMany

        #endregion
    }

}
